package com.yu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yu.bean.Dept;
import com.yu.dao.DeptDAO;
import com.yu.service.DeptService;

@Service
public class DeptServiceImpl implements DeptService {

	@Autowired
	private DeptDAO deptDAO;
	
	@Override
	public int add(Dept dept) {
		return deptDAO.add(dept);
	}

	@Override
	public int update(Dept dept) {
		return deptDAO.update(dept);
	}

	@Override
	public int delete(int id) {
		return deptDAO.delete(id);
	}

	@Override
	public List<Dept> getAll() {
		return deptDAO.getAll();
	}

	@Override
	public Dept getById(int id) {
		return deptDAO.getById(id);
	}

}
